import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';

@Component({
  selector: 'app-c-txt',
  templateUrl: './c-txt.component.html',
  styleUrls: ['./c-txt.component.less']
})
export class CTxtComponent implements OnInit {

  @Output() dataChange = new EventEmitter<object>();
  @Output() onBlur = new EventEmitter<object>();

  @Input() canEdit;

  _text;
  @Input() data;
  set text(value) {
      this.data.text = value;
  }

  get text() {
      return this.data.text;
  }

  constructor() { }

  ngOnInit() {

  }

  blur() {
      this.onBlur.emit();
  }


}
